{% extends '__base.tpl' %}
{% block head %}
<title>编程达人 {{data.name}}</title>
<meta name="keywords" content="编程达人视频教程,免费看视频,{{data.name}}" />
<meta name="description" content="视频教程,下线视频,下载,{{data.name}}"/>
<!-- build:css -->
<link rel="stylesheet" href="../../../public/css/page/DPlayer.min.css">
<link rel="stylesheet" href="../../../public/css/other/wangEditor.css">
<link rel="stylesheet" href="../../../public/css/other/wangEditor-extend.css">
<link rel="stylesheet" type="text/css" href="../../../public/css/page/contentPage.css" />
<link rel="stylesheet" type="text/css" href="../../../public/css/page/popup.css" />
<!-- endbuild -->
<style>
    .dplayer-comment{display: none;}
</style>
{% endblock %}
{% block header %}
<!--头部-->
<div class="header">
    <div id='header' style="max-width: 1200px;width: 100%;margin: 0 auto">
        <span>
            <ul>
                <li><a href='/'>编程达人</a></li>
            </ul>
            {{data.name}}
        </span>
        {%include '__header_right.html'%}
    </div>
</div>
{% endblock %}

{% block body %}
<div id='box' class="video-box video-play-box" data-description="编程达人视频教程-{{data.name}}" data-title="编程达人视频教程-{{data.name}}"
     data-id="{{data.id}}" data-comment_type = "1" data-uptype="video" data-type="1">
<div id='content' data-price="{{data.price or data.gold }}">
  <!--  <div class="contHead">
        <h1>{{data.name}}</h1>
    </div>-->
    <div class="video-body relative">
        <div class="video-content content-video-icon center"
             data-flag="videoInfo" onclick="BASE.VIDEO.playVideo(this)">
            <div content="tips"></div>
            <img class="vmiddle video-bg" src="{{data.cover|imgPath}}">
        </div>
        <div id="dplayer" class="video"></div>
        <ul class="left-nav">
            <li class="left-nav-item catalog-nav icon-catalog" id="catalog_nav"
                onclick="BASE.VIDEO_PLAY.toggleCatalog.call(this)">目录</li>
            <li class="left-nav-item icon-task"
                onclick="BASE.VIDEO_PLAY.scrollTo('training')">作业</li>
            <li class="left-nav-item icon-comment"
                onclick="BASE.VIDEO_PLAY.scrollTo('comment_nav')">评论</li>
        </ul>
        <div class="catalog-box" id="catalog">
            {%include '__video_catalog.html'%}
        </div>
    </div>


</div><!-- end content-->

<div class="lmessage">
    <div class="commentTag">
        <ul class="clearfix">
            <li>播放 <em>{{data.playCount}}</em></li>
            <li>点赞 <em>{{data.likeCount}}</em></li>
            <li>分享 <em>{{data.shareCount}}</em></li>
            <li>
                {% if data.codeUrl=='true'  %}
                <span id="buyIs">
                    <span>
                        {% if data.codePrice>0 or data.codeGold>0 %}
                         <button class="btnBlueM ml20" onclick="BASE.VIDEO_PLAY.buyCode(this)">
                            源码购买
                            {% if data.codePrice %}
                            ¥{{data.codePrice}}
                            {% endif %}
                             {% if data.codePrice>0 and data.codeGold>0 %} / {% endif %}
                            {% if data.codeGold>0  %}
                            金币{{data.codeGold}}
                            {% endif %}
                        </button>
                        {% else %}
                         <a class="btnBlueM ml20" target="_blank"
                                 href="{{'device/videoInfo/codeDownload?videoInfoId='|imgPath(2)+data.id}}">源码下载</a>
                        {% endif %}
                    </span>
                    <span class="hide">
                       <a target="_blank" href="{{'device/videoInfo/codeDownload?videoInfoId='|imgPath(2)+data.id}}"
                          class="btnBlueM ml20">源码下载</a>
                    </span>
                </span>
                {% endif %}
                {% if data.coursewareUrl  %}
                <a class="btnBlueM ml20" target="_blank" href="{{data.coursewareUrl|imgPath}}">课件下载</a>
                {% endif %}
            </li>
            <li class="social-share ml20"  data-initialized="true">分享：
                {%include '__share1.html'%}
            </li>
            <li style="float: right" class="mr20 pointer" >
                <span id="likeIs">
                    <span onclick="BASE.VIDEO_PLAY.zanVideo(this)">
                        <img src='../../../public/images/zan.jpg' class="vsub mr5">点赞
                    </span>
                    <span onclick="BASE.VIDEO_PLAY.cancelzanVideo(this)" class="orange hide">
                        <img src='../../../public/images/zan_h.png' class="vmiddle mr10">已赞
                    </span>
                </span>
                <span id="collectIs" class="ml20">
                    <span data-id="{{data.id}}" onclick="BASE.COMMON.collectVideo(this)">
                         <img src="../../../public/images/collect.jpg" class="vsub mr5">收藏
                    </span>
                   <span data-id="{{data.id}}" onclick="BASE.COMMON.cancelcollectVideo(this)" class="orange hide">
                        <img src='../../../public/images/collect_h.png' class="vmiddle mr10">已收藏
                    </span>
                </span>
               <!-- <button class="btnBlueRadius ml30">快速提问</button>-->
            </li>
        </ul>
    </div> <!-- end commentTag-->
    <div class="lmessageB tabs-nav">
        <span  class="lmText" id="training" onclick="BASE.VIDEO_PLAY.getBbsList.call(this,1)">课后练习</span>
        <span id="comment_nav">评论
            {% if data.commentCount %}
            ({{data.commentCount}})
            {%endif%}
        </span>
        <div class="fright">
            <b class="vmiddle">本节视频:</b>
            {% if data.price>0 or data.gold>0 %}
            <em class="color-warning vsub">
                {% if data.price>0 %}
                ¥ {{data.price}}
                {% endif %}
                {% if data.price>0 and data.gold>0 %}/{% endif %}
                {% if data.gold>0 %}
                金币{{data.gold}}
                {% endif %}
             </em>
             <button class="btnBlueM ml20" onclick="BASE.VIDEO_PLAY.buyVideo(this)">购买</button>
             <!--<button class="btnStyleBlue ml20">加入购物车</button>-->
            {% else %}
            <em class="color-warning">免费</em>
            {% endif %}
        </div>
    </div> <!-- end lmessageB-->
    <div class="lmessageC tabs-con" style="height: auto">
        <!--作业部分-->
        <div class="tabs1"  id="task"  style="display: block;">
            {% if data.trainingAttachUrl or data.trainingText%}
            <div>
                {% if data.trainingAttachUrl %}
                <div class="mb10">
                    <a class="btnBlueM mb20" target="_blank" href="{{data.trainingAttachUrl|imgPath}}" >作业附件下载</a>
                </div>
                {% endif %}
                {% if data.trainingText %}
                <div class="ptb10 vue-editor" >
                    {{data.trainingText | safe }}
                </div>
                {% endif %}
                {% include '__edtior.html' %}
               <!-- <textarea class="reply-textarea" placeholder=""  maxlength="6535" id="task_content"></textarea>-->
                <div class="tright">
                    <button class="btnBlueM ml30" onclick="BASE.VIDEO_PLAY.addBbs(1,'{{data.name}}','{{data.albumId}}')">发送</button>
                </div>
            </div>
            <ul id="taskList" class="lmessageList darenList"></ul>
            <script id="taskList_tpl" type="text/html">
                <%each data.taskList as arr i%>
                <li class="darenList-item clearfix">
                    <div class="head-img-box">
                        <img class="fleft head-img" src=" <%= imgPath(arr.header)%>" />
                    </div>
                    <div class="fleft content-wrap">
                        <h5 class="font15 clo3">
                            <% arr.memberNickName %>
                            <% if arr.memberType==='V' %>
                            <img src="../../../public/images/daren1.jpg" class="iconLV1" />
                            <% else if arr.memberType==='D' %>
                            <img src="../../../public/images/daren2.jpg" class="iconLV" />
                            <%/if%>
                            <span class="clo9 ml20 font12">等级 <%arr.memberType%><%=toFloat(arr.gradeValue/100),0%></span>
                            <span class="clo9 ml20">
                                <img class="vsub" src="../../../public/images/zan.jpg">
                                <% arr.likeCount %>
                            </span>
                            <span class="clo9 ml20">评论：<% arr.commentCount %></span>
                        </h5>
                        <div class="clo9 font12"><%=dateFormat(arr.createDateTime,'yyyy-MM-dd hh:mm')%></div>
                        <a class="follow-task" target="_blank" href="/<% arr.id %>/video_play_task.html">
                            查看作业跟帖
                        </a>
                    </div>
                </li>
                <%/each%>
            </script>
            {% include '__page.html' %}
            {%else%}
            <div class="pd20">
                暂无练习
            </div>
            {%endif%}
        </div>
        <!-- 评论部分-->
        <div class="tabs2" id="comment">
            {% include '__comment_reply_list.html' %}
        </div>
    </div><!-- end lmessageC-->
</div><!-- end lmessage-->



</div> <!-- end box-->

   
{% endblock %}

{% block script %}
 {{ super() }}
<!-- build:js -->
 <script src="../../../public/js/page/plugin/wangEditor.js"></script>
 <script src="../../../public/js/page/plugin/wangEditor-extentd.js"></script>
 <script src="../../../public/js/page/plugin/DPlayer.min.js"></script>
 <script src='../../../public/js/page/plugin/nativepage.js'></script>
 <script src='../../../public/js/page/common/upload.js'></script>
 <script src='../../../public/js/page/common/video.js'></script>
 <script src='../../../public/js/page/video/video_play.js'></script>
<!-- endbuild -->
{% endblock %}